#include <QtGui/QApplication>
#include <QtOpenGL/QGLWidget>
#include <QLayout>
#include <fstream>
#include "paintdata.h"
#include "gldrawer.h"
#include "tools.h"
#include "../geometry/polygon.h"

int main(int argc, char *argv[]) {
    polygon_data_t polygon;
    std::ifstream in("input");
    in >> polygon;
    QApplication app(argc, argv);
    paint_data_t data(polygon);
    ToolsPanel * tools_panel = new ToolsPanel(&data);
    QWidget widget;
    widget.resize(900, 600);
    QHBoxLayout layout;
    GLDrawer * window = new GLDrawer(&data);
    layout.addWidget(window);
    layout.addWidget(tools_panel);
    widget.setLayout(& layout);
    widget.show();
    int a = app.exec();
    return a;
}
